<?php

namespace common\models\hospital;

use Yii;

/**
 * This is the model class for table "{{%registration_header}}".
 *
 * @property int $id
 * @property string|null $hospital 医院简称
 * @property string|null $document_id 单据号
 * @property string|null $card_id 卡号(表头)
 * @property string|null $truename 患者姓名(表头)
 * @property string|null $sex 性别(表头)
 * @property string|null $birthday 生日
 * @property string|null $registration_time 挂号时间
 * @property string|null $section 科室
 * @property string|null $doctor_name 医生姓名
 * @property string|null $disease_type 挂号病种
 * @property string|null $registration_type 挂号方式
 * @property string|null $message_source 信息来源
 * @property string|null $mobile 电话号码
 * @property string|null $address 地址
 * @property string|null $phone 联系手机
 * @property string|null $salesman 业务员
 * @property string|null $operator 操作员
 * @property string|null $Insurance_pay 保险支付
 * @property string|null $person_pay 个人支付
 * @property string|null $registration_fee 挂号费
 * @property string|null $treatment 治疗费
 * @property string|null $other_fee 其他费
 * @property string|null $Summary_time 汇总时间
 */
class RegistrationHeader extends \common\models\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%registration_header}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['hospital'], 'string', 'max' => 20],
            [['document_id', 'card_id', 'truename', 'sex', 'birthday', 'registration_time', 'section', 'doctor_name', 'disease_type', 'registration_type', 'message_source', 'mobile', 'address', 'phone', 'salesman', 'operator', 'Insurance_pay', 'person_pay', 'registration_fee', 'treatment', 'other_fee', 'Summary_time'], 'string', 'max' => 10],
        ];
    }

    public static function getDb()
    {
        return Yii::$app->db3;
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'hospital' => 'Hospital',
            'document_id' => 'Document ID',
            'card_id' => 'Card ID',
            'truename' => 'Truename',
            'sex' => 'Sex',
            'birthday' => 'Birthday',
            'registration_time' => 'Registration Time',
            'section' => 'Section',
            'doctor_name' => 'Doctor Name',
            'disease_type' => 'Disease Type',
            'registration_type' => 'Registration Type',
            'message_source' => 'Message Source',
            'mobile' => 'Mobile',
            'address' => 'Address',
            'phone' => 'Phone',
            'salesman' => 'Salesman',
            'operator' => 'Operator',
            'Insurance_pay' => 'Insurance Pay',
            'person_pay' => 'Person Pay',
            'registration_fee' => 'Registration Fee',
            'treatment' => 'Treatment',
            'other_fee' => 'Other Fee',
            'Summary_time' => 'Summary Time',
        ];
    }
}
